| OverlayIcon Property |
Returns/sets the Overlay Icon of the referenced Node object in the TreeView control.
Syntax
object.OverlayIcon(Node) [= Index]
The OverlayIcon property syntax has these parts:
| Part | Description |
|---|---|
| object | Required. An object expression that evaluates to an object in the Applies To list. |
| Node | Required. A valid Node (MSComctlLib.Node) object. |
| Index | A value that specifies the branch depth/nesting level. |
Settings
The OverlayIcon property settings are:
| Constant | Setting | Description |
|---|---|---|
| [No Overlay] | 0 | None. Normal Icon display for the referenced Node |
| [Share Overlay] | 1 | Share Overlay Icon over normal Icon. |
| [Shortcut Overlay] | 2 | Shortcut Overlay Icon over normal Icon. |
| [Custom 1] | 3 | Custom 1 Icon over normal Icon. |
| [Custom 2] | 4 | Custom 2 Icon over normal Icon. |
| [Custom 3] | 5 | Custom 3 Icon over normal Icon. |
Remarks
Before the OverlayIcon property can be called, the Overlay Icons to be used must be initialised first - see .SetOverlayImage method's example for more details. Also, an MSComctlLib.ImageList must be associated with the TreeView control.
Data Type
eItemOverlayIndices
Example
| ' '## Note: oTree is a reference to the vbTree.cTreeView class ' With TreeView1 ' '## Set Overlay Icon ' oTree.OverlayIcon(.SelectedItem) = [Share Overlay] If oTree.OverlayIcon(.SelectedItem) = [Share Overlay] Then ' '## Test = True if Node's overlay Icon = 'Shared' ' Msgbox "Node is Shared!" End If End With |